﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace Shapes
{
    public partial class Shapes : Form
    {
        public Shapes()
        {
            InitializeComponent();
        }

        private void Shapes_Load(object sender, EventArgs e)
        {
            cmbShape.Text = "select";
            cmbDrawing.Text = "select";
            txtOut.Text = "press the button";
        }

        private void button1_Click(object sender, EventArgs e)
        {
            if (cmbShape.Text != "select" && cmbDrawing.Text != "select")
            {
                if (cmbShape.Text =="Rectangle" && cmbDrawing.Text =="DR1")
                {
                    Shape rec = new V1Rectangle();
                    txtOut.Text= rec.draw();
                }
                else if (cmbShape.Text == "Rectangle" && cmbDrawing.Text == "DR2")
                {
                    Shape rec = new V2Rectangle();
                    txtOut.Text = rec.draw();
                }
                else if (cmbShape.Text == "Circle" && cmbDrawing.Text == "DR1")
                {
                    Shape rec = new V1Circle();
                    txtOut.Text = rec.draw();
                }
                else if (cmbShape.Text == "Circle" && cmbDrawing.Text == "DR2")
                {
                    Shape rec = new V2Circle();
                    txtOut.Text = rec.draw();
                }
            }


        }

        private void txtOut_TextChanged(object sender, EventArgs e)
        {

        }

        private void cmbDrawing_SelectedIndexChanged(object sender, EventArgs e)
        {

        }

        private void cmbShape_SelectedIndexChanged(object sender, EventArgs e)
        {

        }

        private void label3_Click(object sender, EventArgs e)
        {

        }

        private void label2_Click(object sender, EventArgs e)
        {

        }

        private void label1_Click(object sender, EventArgs e)
        {

        }
    }
}
